#pragma once

#include "CTileManager.h"
#include <vector>
using namespace std;

#include "CLevelCollision.h"

class CWaypoint;
class CSpawnPoint;
class CTerritory;

enum levelArea {CITY_NE, CITY_SE, CITY_SW, CITY_NW, FOREST_ONE, LAKE_AREA, FOREST_TWO, CROSS, CLIFF, CAVE};
class CLevel
{
	vector<CWaypoint*> m_vecWaypoints;
	vector<CSpawnPoint*> m_vecSpawnpoints;
	vector<CTerritory*> m_vecTerritories;
	vector<CLevelCollision*> m_vecLevelCollision;
	int m_nBGMusic;
	float m_fTimer;
	int m_nScore;
	int m_ncurrArea;

public:

	vector<CSpawnPoint*> Spawnpoints() const { return m_vecSpawnpoints; }
	vector<CTerritory*> Territories() const { return m_vecTerritories; }

	int GetCurrArea() {return m_ncurrArea;}
	void SetCurrArea(int area) {m_ncurrArea = area;}

	CLevel();
	~CLevel();

	void Enter(char* szFileName);
	void Clear();
	void Update(float fDelta);
	void Render();
	void Exit();
	void AddWayPoint(CWaypoint* pWaypoint){m_vecWaypoints.push_back(pWaypoint);}
	void RemoveWayPoint(CWaypoint* pWaypoint);
	void AddSpawnPoint(CSpawnPoint* pSpawnpoint){m_vecSpawnpoints.push_back(pSpawnpoint);}
	void RemoveSpawnPoint(CSpawnPoint* pSpawnpoint);
	void AddTerritory(CTerritory* pTerritory){m_vecTerritories.push_back(pTerritory);}
	void RemoveTerritory(CTerritory* pTerritory);
	void AddCollision(CLevelCollision* pCollision){m_vecLevelCollision.push_back(pCollision);}
};